Mid 2012 Macbook Pro 13-inch partition map corrupted
I have been plugging in my external hard disk which runs Fedora 24 quite frequently past a couple of days. I use the option key during boot to choose the operating system. So now my OS X El Capitan wont turn on due to a partition error. I fixed this using the internet recovery, but I'm 100% sure this issue will come up soon. Is there a fix for this? What is the cause of this issue?
Macbook Pro Mid-2012 13'' Specs:
OS: El Capitan 10.11.6
Processor: i5 2.5 GHz
Storage: 500 GB HDD
Memory: 16 GB (Max upgrade for this model stated by Apple is 8GB but 3rd party vendor OWC makes a customized 16GB for this specific model)
Any suggestions/comments would be appreciated.
MacBook Pro (13-inch Mid 2012), OS X El Capitan (10.11.6)